﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using CNVP.JShop.UI;
using CNVP.JShop.BLL;
using CNVP.Framework.Utils;
using System.Data;

namespace CNVP.JShop.Admin.Template.Operate
{
    public partial class ColumnSet : AdminPage
    {
        public string _ParentID = string.Empty;
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!BLL.BLLCheckAdmin.LoginOk(Page, 102) || !BLL.BLLCheckAdmin.LoginOk(Page, 118) || !BLL.BLLCheckAdmin.LoginOk(Page, 119)) return;//判断页面权限
            if (!IsPostBack)
            {
                _ParentID = Request.Params["ParentID"];
                if ((!string.IsNullOrEmpty(_ParentID)) && Public.IsNumber(_ParentID))
                {
                    CNVP.JShop.BLL.CNVP_Column bll = new CNVP.JShop.BLL.CNVP_Column();
                    DataTable Dt = bll.GetColumnInfo(Convert.ToInt32(_ParentID));
                    if (Dt != null && Dt.Rows.Count > 0)
                    {
                        TxtColumnName.Text = Dt.Rows[0]["ColumnName"].ToString();
                    }
                    Dt.Dispose();
                    Dt.Clear();
                }
            }
        }
    }
}